package com.sc.study.ar.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sc.study.ar.mapper.ScSubjectTableAppraiseMapper;
import com.sc.study.ar.domain.ScSubjectTableAppraise;
import com.sc.study.ar.service.IScSubjectTableAppraiseService;

/**
 * 课程评价Service业务层处理
 * 
 * @author sc
 * @date 2022-03-14
 */
@Service
public class ScSubjectTableAppraiseServiceImpl implements IScSubjectTableAppraiseService 
{
    @Autowired
    private ScSubjectTableAppraiseMapper scSubjectTableAppraiseMapper;

    /**
     * 查询课程评价
     * 
     * @param id 课程评价主键
     * @return 课程评价
     */
    @Override
    public ScSubjectTableAppraise selectScSubjectTableAppraiseById(Long id)
    {
        return scSubjectTableAppraiseMapper.selectScSubjectTableAppraiseById(id);
    }

    /**
     * 查询课程评价列表
     * 
     * @param scSubjectTableAppraise 课程评价
     * @return 课程评价
     */
    @Override
    public List<ScSubjectTableAppraise> selectScSubjectTableAppraiseList(ScSubjectTableAppraise scSubjectTableAppraise)
    {
        return scSubjectTableAppraiseMapper.selectScSubjectTableAppraiseList(scSubjectTableAppraise);
    }

    /**
     * 新增课程评价
     * 
     * @param scSubjectTableAppraise 课程评价
     * @return 结果
     */
    @Override
    public int insertScSubjectTableAppraise(ScSubjectTableAppraise scSubjectTableAppraise)
    {
        return scSubjectTableAppraiseMapper.insertScSubjectTableAppraise(scSubjectTableAppraise);
    }

    /**
     * 修改课程评价
     * 
     * @param scSubjectTableAppraise 课程评价
     * @return 结果
     */
    @Override
    public int updateScSubjectTableAppraise(ScSubjectTableAppraise scSubjectTableAppraise)
    {
        return scSubjectTableAppraiseMapper.updateScSubjectTableAppraise(scSubjectTableAppraise);
    }

    /**
     * 批量删除课程评价
     * 
     * @param ids 需要删除的课程评价主键
     * @return 结果
     */
    @Override
    public int deleteScSubjectTableAppraiseByIds(Long[] ids)
    {
        return scSubjectTableAppraiseMapper.deleteScSubjectTableAppraiseByIds(ids);
    }

    /**
     * 删除课程评价信息
     * 
     * @param id 课程评价主键
     * @return 结果
     */
    @Override
    public int deleteScSubjectTableAppraiseById(Long id)
    {
        return scSubjectTableAppraiseMapper.deleteScSubjectTableAppraiseById(id);
    }
}
